package com.un.ebs.sys.service;

import org.redisson.api.RLock;

import java.util.Map;

public interface RedisService {
    Map<String, Double> getBalanceMap(String key);

    Long getAtomicLong(String key);

    Long setAtomicLong(String key, Long value, Long sec);

    Long incAtomicLong(String key, Long value, Long sec);

    Long decAtomicLong(String key, Long value, Long sec);

    Double getAtomicDouble(String key);

    Double setAtomicDouble(String key, Double value, Long sec);

    Double incAtomicDouble(String key, Double value, Long sec);

    Double decAtomicDouble(String key, Double value, Long sec);

    RLock getLock(String key);

    <T> void set(String key, T value, Long sec);

    <T> T get(String key);

    void remove(String key);

    <T> void hSet(String key, String hashKey, T hashValue);

    <T> T hGet(String key, String hashKey);

    <T> Map<String, T> hGet(String key);

    <T> boolean hasKey(String key, T value);

    //void setStatistics(StatisticsDto data);
}
